// 导出 add 函数
const add = (x, y) => x + y;



// 将 add 函数导出
export {
  add
}

export const myWifeBirthday = '19951-01-01';


export const sum = (x, y, z) => x + y + z;



// xxx
// xxx


// 写了1W个函数，是N个人写的

// 导出默认值
export default {
  author: 'song',
  age: 3
}

export class Tabs {
  constructor(container) {
    this.domTabs = container.querySelectorAll('ul > li');
    this.domBodys = container.querySelectorAll('ol > li');

    this.change();
  }

  change() {
    this.domTabs.forEach((tabLi, index) => {
      tabLi.addEventListener('click', e => {
        // 给 tab 增加 点击选中 功能
        this.domTabs.forEach(li => li.className = '');
        tabLi.className = 'active';

        // 单击 tab，对应的 body 显示
        this.domBodys.forEach(li => li.className = '');
        this.domBodys[index].className = 'active';
      })
    })
  }
}
